package com.edu.whty.common.tools.kafka;

//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import org.apache.kafka.clients.producer.ProducerRecord;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.kafka.core.KafkaTemplate;
//import org.springframework.stereotype.Component;

//@Component
public class KafkaProducter {

//    @Autowired
//    private KafkaTemplate kafkaTemplate;
//
//    @Value("${rrtbk.kafka.topics.write}")
//    private String topics;
//
//    public void sendTest() {
//        JSONObject jsonObject = new JSONObject();
//        jsonObject.put("msg", "test");
//        kafkaTemplate.send(topics, JSON.toJSONString(jsonObject));
//    }
//
//    public void send(CommonMessage message) {
//        kafkaTemplate.send(topics, JSON.toJSONString(message));
//    }
}
